<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

/*
hello world route
Route::get('/', function()
{
	return View::make('hello');
});
*/


// PRIVATE
Route::group(array('before' => 'auth'), function()
{
    Route::get('/app', 'AppController@viewHome');
    Route::get('/logout', 'AppController@logout');

    Route::resource('items', 'ItemController');
    Route::resource('item_types', 'ItemTypeController');
    Route::resource('item_categories', 'ItemCategoryController');
    Route::resource('containers', 'ContainerController');
    Route::resource('lots', 'LotController');
    Route::get('/checkout', 'ItemController@viewCheckout');
    Route::post('/checkout', 'ItemController@storeCheckout');
    Route::get('/item_types_select', 'ItemTypeController@select');
});


// PUBLIC
Route::get('/', 'PagesController@viewHome');
Route::post('/', 'PagesController@doLogin');
Route::get('/signup', 'PagesController@viewSignup');
Route::post('/signup', 'PagesController@storeSignup');
